Build-Depends: debhelper (>= 7.0.0), quilt,
autotools-dev, autoconf,
libexpat1-dev, expat, help2man,
- fop,
+ fop [!mips],
xsltproc, docbook-xml, docbook-xsl, libxml2-utils,
libusb-dev, zlib1g-dev, libpaper-dev, libqt4-dev
Standards-Version: 3.8.4
PKG_GPSBABEL=gpsbabel
PKG_GPSBABEL_GUI=gpsbabel-gui
+DOCTEMP = debian/doctmp
VERSION := $(shell dpkg-parsechangelog | awk '/^Version/ {print $$2}')
+HOSTARCH := $(strip $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU))
#we use quilt to handle our patches
include /usr/share/quilt/quilt.make
# Extended precision on i386 results in weird bugs, so we build
# with -ffloat-store.
-ifeq (i386,$(strip $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)))
+ifeq (i386,$(HOSTARCH))
CFLAGS += -ffloat-store
endif
configure: configure-stamp gui/Makefile
configure-stamp: $(QUILT_STAMPFN)
dh_testdir
-ifneq "$(wildcard /usr/share/misc/config.sub)" ""
+ifneq (,$(wildcard /usr/share/misc/config.sub))
cp -f /usr/share/misc/config.sub config.sub
endif
-ifneq "$(wildcard /usr/share/misc/config.guess)" ""
+ifneq (,$(wildcard /usr/share/misc/config.guess))
cp -f /usr/share/misc/config.guess config.guess
endif
- $(CONFENV) ./configure --with-zlib=system --with-doc=debian/doctmp \
+ $(CONFENV) ./configure --with-zlib=system --with-doc=$(DOCTEMP) \
--prefix=/usr
touch $@
touch $@
build-doc-stamp: configure-stamp
- $(MAKE) doc
+ $(MAKE) $(DOCTEMP)/htmldoc-devel/index.html WEB=$(DOCTEMP) DOCVERSION=devel
+ cp $(CURDIR)/debian/gpsbabel.doc-base.common $(CURDIR)/debian/gpsbabel.doc-base
+ifneq (mips,$(HOSTARCH))
+ $(MAKE) gpsbabel.pdf WEB=$(DOCTEMP) DOCVERSION=devel
+ rm -f $(CURDIR)/$(DOCTEMP)/htmldoc-devel/gpsbabel-$(DOCVERSION).pdf DOCVERSION=devel
+ cp gpsbabel.pdf $(CURDIR)/$(DOCTEMP)
+ cat $(CURDIR)/debian/gpsbabel.doc-base.pdf >> $(CURDIR)/debian/gpsbabel.doc-base
+endif
touch $@
build-gui: build-gui-stamp
xmldoc/filters/options/track-trk2seg.xml \
xmldoc/filters/options/track-seg2trk.xml
rm -f gbversion.h
+ rm -f $(CURDIR)/debian/gpsbabel.doc-base
dh_clean
install: $(BUILD_TARGETS)
# Add here commands to install the package into debian/gpsbabel.
$(MAKE) install DESTDIR=$(CURDIR)/debian/gpsbabel
- # Rename htmldoc dir and remove pdf file
+ # Rename htmldoc dir
mv `ls -d $(CURDIR)/debian/doctmp/htmldoc-*` $(CURDIR)/debian/doctmp/htmldoc
- rm -f $(CURDIR)/debian/doctmp/htmldoc/*.pdf
dh_install